package com.framework.log.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;

import com.framework.common.config.EntityUpdateListener;
import com.framework.common.listener.impl.BaseEntityUpdate;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@Entity
@Table
@EntityListeners(EntityUpdateListener.class)
@EqualsAndHashCode(callSuper = true)
public class SysLog extends BaseEntityUpdate {

	private static final long serialVersionUID = 6621820453513029685L;

	@Column(columnDefinition = "varchar(32) COMMENT 'userId'")
	private String userId;
	
	@Column(columnDefinition = "varchar(100) COMMENT '操作用户'")
    private String username;

	@Column(columnDefinition = "varchar(32) COMMENT '日志类型'")
    private String type;
	
	@Column(columnDefinition = "varchar(100) COMMENT '日志类型描述'")
    private String description;
	
	@Column(columnDefinition = "varchar(100) COMMENT '方法名'")
    private String method;

	@Column(columnDefinition = "TEXT COMMENT '参数'")
    private String params;

	@Column(columnDefinition = "varchar(32) COMMENT '日志等级'")
    private String level;

	@Column(columnDefinition = "varchar(30) COMMENT '请求ip'")
    private String requestIp;

	@Column(columnDefinition = "varchar(200) COMMENT '地址'")
    private String address;

    /** 浏览器  */
	@Column(columnDefinition = "varchar(100) COMMENT '浏览器'")
    private String browser;

	@Column(columnDefinition = "BIGINT COMMENT '请求耗时'")
    private Long time;

	@Column(columnDefinition = "TEXT COMMENT '异常详细'")
    private String exceptionDetail;
    
}
